package com.iweb.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

/**
 * 南京艾瑞
 * 作者: jack
 * 时间: 2020-06-28 11:25
 * 描述: AppConfig
 */
@Configuration
/*<context:component-scan base-package="com.iweb.controller"/>*/
@ComponentScan("com.iweb.controller")
public class AppConfig {


    /*
    *
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/"/>
        <property name="suffix" value=".jsp"/>
    </bean>*/
    @Bean
    public InternalResourceViewResolver resourceViewResolver() {
        InternalResourceViewResolver resourceViewResolver = new InternalResourceViewResolver();
        resourceViewResolver.setPrefix("/");
        resourceViewResolver.setSuffix(".jsp");
        return resourceViewResolver;
    }
}
